<!--
 * @Author: ITDLCL
 * @Date: 2024-10-30 13:46:25
 * @LastEditors: ITDLCL
 * @Description:
-->
<!-- 会员信息 -->
<template>
  <view class="user-card">
    <view class="code d-flex">
      <view class="memberzone-number d-flex">
        <label class="siyuan-medium">{{ info.levelName }}</label>
        <text>
          会员码：<text class="intel-one-mono-regular">{{
            info.memberNo.substr(0, 4) +
            "****" +
            info.memberNo.substr(info.memberNo.length - 3)
          }}</text>
        </text>
      </view>
      <image src="https://bac-miniprogram.oss-cn-beijing.aliyuncs.com/images/member/member_card_img.png" mode="heightFix"></image>
    </view>
    <view class="wx-credit d-flex" @click="openPage('/pages/personal/credit',true)">
      <text class="siyuan-medium">微信用户</text>
      <text class="siyuan-medium">积分：<text class="intel-one-mono-medium">{{ info.point }}</text></text>
    </view>
  </view>
</template>

<script setup>
import { openPage } from "@/util/index.js"
let props = defineProps({
  info: {
    type: Object,
    default: {
      memberNo: "",
    },
  },
});
</script>

<style lang="scss" scoped>
.user-card {
  border-top: 2rpx solid #000000;
  .code {
    padding: 34rpx 88rpx 18rpx 72rpx;
    align-items: center;
    background-color: #dcefff;
    justify-content: space-between;
    .memberzone-number {
      height: 150rpx;
      flex: 1;
      flex-direction: column;
      justify-content: space-between;
      label {
        font-size: 26rpx;
      }
      text {
        font-size: 20rpx;
      }
    }
    image {
      height: 220rpx;
      max-width: 220rpx;
    }
  }
  .wx-credit {
    height: 102rpx;
    padding: 0 70rpx;
    align-items: center;
    justify-content: space-between;
    background: #ffffff;
    border-top: 2rpx solid #000000;
    border-bottom: 2rpx solid #000000;
  }
}
</style>
